//导入configureStore函数，用来创建store对象
import {configureStore} from '@reduxjs/toolkit'
import routesReducer from './modules/routesReducer'
/*
    configureStore(配置对象)
*/
const store=configureStore({
    reducer:{
        routesReducer
    }
})


// Infer the `RootState` and `AppDispatch` types from the store itself
export type RootState = ReturnType<typeof store.getState>
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch
export default store